<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimpenv: GIMP 3 Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP 3 Base Library Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase3-gimpcpuaccel.html" title="gimpcpuaccel">
<link rel="next" href="libgimpbase3-gimpmemsize.html" title="gimpmemsize">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgimpbase3-gimpenv.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimpbase3-gimpcpuaccel.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpbase3-gimpmemsize.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpbase3-gimpenv"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpbase3-gimpenv.top_of_page"></a>gimpenv</span></h2>
<p>gimpenv — Functions to access the GIMP environment.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpbase3-gimpenv.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-env-init" title="gimp_env_init ()">gimp_env_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-directory" title="gimp_directory ()">gimp_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-installation-directory" title="gimp_installation_directory ()">gimp_installation_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()">gimp_data_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()">gimp_locale_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()">gimp_sysconf_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()">gimp_plug_in_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-cache-directory" title="gimp_cache_directory ()">gimp_cache_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-temp-directory" title="gimp_temp_directory ()">gimp_temp_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-directory-file" title="gimp_directory_file ()">gimp_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-installation-directory-file" title="gimp_installation_directory_file ()">gimp_installation_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-data-directory-file" title="gimp_data_directory_file ()">gimp_data_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-locale-directory-file" title="gimp_locale_directory_file ()">gimp_locale_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-sysconf-directory-file" title="gimp_sysconf_directory_file ()">gimp_sysconf_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-plug-in-directory-file" title="gimp_plug_in_directory_file ()">gimp_plug_in_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()">gimp_path_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-path-to-str" title="gimp_path_to_str ()">gimp_path_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-path-free" title="gimp_path_free ()">gimp_path_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase3-gimpenv.html#gimp-path-get-user-writable-dir" title="gimp_path_get_user_writable_dir ()">gimp_path_get_user_writable_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpbase3-gimpenv.description"></a><h2>Description</h2>
<p>A set of functions to find the locations of GIMP's data directories
and configuration files.</p>
</div>
<div class="refsect1">
<a name="libgimpbase3-gimpenv.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-env-init"></a><h3>gimp_env_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_env_init (<em class="parameter"><code><span class="type">gboolean</span> plug_in</code></em>);</pre>
<p>You don't need to care about this function. It is being called for
you automatically (by means of the <a href="/local/head/share/gtk-doc/html/libgimp/libgimp-gimp.html#MAIN:CAPS"><code class="function">MAIN()</code></a> macro that every plug-in
runs). Calling it again will cause a fatal error.</p>
<div class="refsect3">
<a name="gimp-env-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plug_in</p></td>
<td class="parameter_description"><p>must be <code class="literal">TRUE</code> if this function is called from a plug-in</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory"></a><h3>gimp_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the user-specific GIMP settings directory. If the
environment variable GIMP3_DIRECTORY exists, it is used. If it is
an absolute path, it is used as is.  If it is a relative path, it
is taken to be a subdirectory of the home directory. If it is a
relative path, and no home directory can be determined, it is taken
to be a subdirectory of <a class="link" href="libgimpbase3-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<p>The usual case is that no GIMP3_DIRECTORY environment variable
exists, and then we use the GIMPDIR subdirectory of the local
configuration directory:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>UNIX: $XDG_CONFIG_HOME (defaults to $HOME/.config/)</p></li>
<li class="listitem"><p>Windows: CSIDL_APPDATA</p></li>
<li class="listitem"><p>OSX (UNIX exception): the Application Support Directory.</p></li>
</ul></div>
<p>If neither the configuration nor home directory exist,
<code class="function">g_get_user_config_dir()</code> will return {tmp}/{user_name}/.config/ where
the temporary directory {tmp} and the {user_name} are determined
according to platform rules.</p>
<p>In any case, we always return some non-empty string, whether it
corresponds to an existing directory or not.</p>
<p>In config files such as gimprc, the string ${gimp_dir} expands to
this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8 (on Windows it is always
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-directory.returns"></a><h4>Returns</h4>
<p> The user-specific GIMP settings directory.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-installation-directory"></a><h3>gimp_installation_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_installation_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top installation directory of GIMP. On Unix the
compile-time defined installation prefix is used. On Windows, the
installation directory as deduced from the executable's full
filename is used. On OSX we ask [NSBundle mainBundle] for the
resource path to check if GIMP is part of a relocatable bundle.</p>
<p>In config files such as gimprc, the string ${gimp_installation_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-installation-directory.returns"></a><h4>Returns</h4>
<p> The toplevel installation directory of GIMP.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory"></a><h3>gimp_data_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_data_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP data. If the environment
variable GIMP3_DATADIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as
deduced from the executable's full filename is used.</p>
<p>Note that the actual directories used for GIMP data files can be
overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_data_dir} expands
to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-data-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-locale-directory"></a><h3>gimp_locale_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_locale_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP locale files. If the environment
variable GIMP3_LOCALEDIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
the C library, which isn't necessarily UTF-8. (On Windows, unlike
the other similar functions here, the return value from this
function is in the system codepage, never in UTF-8. It can thus be
passed directly to the <code class="function">bindtextdomain()</code> function from libintl which
does not handle UTF-8.)</p>
<div class="refsect3">
<a name="gimp-locale-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP locale files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-sysconf-directory"></a><h3>gimp_sysconf_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_sysconf_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP config files. If the environment
variable GIMP3_SYSCONFDIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>In config files such as gimprc, the string ${gimp_sysconf_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-sysconf-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP config files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-plug-in-directory"></a><h3>gimp_plug_in_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_plug_in_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP plug-ins and modules. If
the environment variable GIMP3_PLUGINDIR exists, that is used.  It
should be an absolute pathname. Otherwise, on Unix the compile-time
defined directory is used. On Windows, the installation directory
as deduced from the executable's full filename is used.</p>
<p>Note that the actual directories used for GIMP plug-ins and modules
can be overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_plug_in_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-plug-in-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP plug_ins and modules.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-cache-directory"></a><h3>gimp_cache_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_cache_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP cached files. If the
environment variable GIMP3_CACHEDIR exists, that is used.  It
should be an absolute pathname.  Otherwise, a subdirectory of the
directory returned by <code class="function">g_get_user_cache_dir()</code> is used.</p>
<p>Note that the actual directories used for GIMP caches files can
be overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_cache_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-cache-directory.returns"></a><h4>Returns</h4>
<p> The default top directory for GIMP cached files.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-temp-directory"></a><h3>gimp_temp_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_temp_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP temporary files. If the
environment variable GIMP3_TEMPDIR exists, that is used.  It
should be an absolute pathname.  Otherwise, a subdirectory of the
directory returned by <code class="function">g_get_tmp_dir()</code> is used.</p>
<p>In config files such as gimprc, the string ${gimp_temp_dir} expands
to this directory.</p>
<p>Note that the actual directories used for GIMP temporary files can
be overridden by the user in the preferences dialog.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-temp-directory.returns"></a><h4>Returns</h4>
<p> The default top directory for GIMP temporary files.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory-file"></a><h3>gimp_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                     <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the user's GIMP directory, or the GIMP
directory itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-directory" title="gimp_directory ()"><code class="function">gimp_directory()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gimp-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
user's GIMP directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-installation-directory-file"></a><h3>gimp_installation_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_installation_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                                  <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the installation directory, or the installation
directory itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-installation-directory" title="gimp_installation_directory ()"><code class="function">gimp_installation_directory()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gimp-installation-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
top installation directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-installation-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory-file"></a><h3>gimp_data_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_data_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                          <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the data directory, or the data directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gimp-data-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
data directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-data-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-locale-directory-file"></a><h3>gimp_locale_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_locale_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                            <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the locale directory, or the locale directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()"><code class="function">gimp_locale_directory()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gimp-locale-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
locale directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-locale-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-sysconf-directory-file"></a><h3>gimp_sysconf_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_sysconf_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                             <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the sysconf directory, or the sysconf directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()"><code class="function">gimp_sysconf_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
sysconf directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-plug-in-directory-file"></a><h3>gimp_plug_in_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_plug_in_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                             <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the plug-in directory, or the plug-in directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase3-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()"><code class="function">gimp_plug_in_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
plug-in directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.returns"></a><h4>Returns</h4>
<p>a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-parse"></a><h3>gimp_path_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gimp_path_parse (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
                 <em class="parameter"><code><span class="type">gint</span> max_paths</code></em>,
                 <em class="parameter"><code><span class="type">gboolean</span> check</code></em>,
                 <em class="parameter"><code><span class="type">GList</span> **check_failed</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories separated by <span class="type">G_SEARCHPATH_SEPARATOR</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_paths</p></td>
<td class="parameter_description"><p>The maximum number of directories to return.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if you want the directories to be checked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_failed</p></td>
<td class="parameter_description"><p>Returns a <span class="type">GList</span> of path elements for which the check failed. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename][<acronym title="Out parameter, where callee must allocate storage."><span class="acronym">out callee-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-parse.returns"></a><h4>Returns</h4>
<p>A <span class="type">GList</span> of all directories in <em class="parameter"><code>path</code></em>
. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-to-str"></a><h3>gimp_path_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_path_to_str (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase3-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-to-str.returns"></a><h4>Returns</h4>
<p>A searchpath string separated by <span class="type">G_SEARCHPATH_SEPARATOR</span>. </p>
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-free"></a><h3>gimp_path_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_path_free (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<p>This function frees the memory allocated for the list and the strings
it contains.</p>
<div class="refsect3">
<a name="gimp-path-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase3-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename]</span></td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-get-user-writable-dir"></a><h3>gimp_path_get_user_writable_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_path_get_user_writable_dir (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<p>Note that you have to <code class="function">g_free()</code> the returned string.</p>
<div class="refsect3">
<a name="gimp-path-get-user-writable-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase3-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-get-user-writable-dir.returns"></a><h4>Returns</h4>
<p> The first directory in <em class="parameter"><code>path</code></em>
where the user has write permission.</p>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>